package com.bxj.wxtt.utils;

import java.util.Date;

/**
 * Created by baixiujiang on 17/11/13.
 */
public class DateTimeUtils {

    public static boolean isSameDay(Date date1, Date date2) {
        return date1.getYear() == date2.getYear() && date1.getMonth() == date2.getMonth() && date1.getDate() == date2.getDate();
    }
    public static boolean isSameDay(Date date1) {
        return isSameDay(date1, new Date());
    }


    public static void main(String args[]) {
        Date date = new Date();
        System.out.println(date);
        System.out.println(DateTimeUtils.isSameDay(date));
    }
}
